﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="DuJianliang.ApplicationPlatform.UserPermission.UserList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body style="font-size:12px">
    <form id="form1" runat="server">
    <div style="text-align:right; margin-bottom:5px;width:100%">
        <asp:Button ID="btnCreate" runat="server" Text="添加" onclick="btnCreate_Click"></asp:Button>
    </div>
    <div style="width:100%">
        <asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" Font-Size="9pt" ForeColor="#333333" GridLines="Both"
                Width="100%"  DataKeyNames="UserID" onrowcommand="gridView_RowCommand" 
            AllowPaging="True" PageSize="20" 
            onpageindexchanging="gridView_PageIndexChanging" 
            onrowdatabound="gridView_RowDataBound" >                                   
                <Columns>
                    <asp:BoundField HeaderText="用户名" DataField="Username"  />
                    <asp:BoundField HeaderText="姓名" DataField="TrueName"  />
                    <asp:BoundField HeaderText="Email" DataField="Email"  />
                    <asp:BoundField HeaderText="所属部门" />
                    <asp:BoundField HeaderText="是否为管理员" DataField="IsAdmin" />
                    <asp:TemplateField HeaderText="操作" ItemStyle-Width="180px">
                        <ItemTemplate>
                            <asp:Button ID="btnEdit" runat="server" Text="编辑" Height="20px" CommandName="CmdEdit"></asp:Button>
                            <asp:Button ID="btnDelete" runat="server" Text="删除" Height="20px" CommandName="CmdDelete" OnClientClick="return confirm('确定要删除吗?')"></asp:Button>
                            <asp:Button ID="btnSetPermission" runat="server" Text="设置权限" Height="20px" CommandName="CmdSetPermission" ></asp:Button>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#DFE8F6" Font-Bold="True" ForeColor="#333333" Height="20px" />    
                <RowStyle BackColor="#FAFAFA" ForeColor="#333333" HorizontalAlign="Center"/>
                <EmptyDataTemplate>
                    <div style="text-align:center; margin-top:20px; margin-bottom:20px;">当前没有任何数据</div>        
                </EmptyDataTemplate>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
